package com.spring.springboot.user2.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.spring.springboot.user2.entity.User2Entity;
import com.spring.springboot.user2.jpa.User2JPA;

/**
*@author LSY
*Time: 2018年12月18日下午5:55:19
*
*
*/
@RestController("user2Controller")
@RequestMapping("/user2")
public class User2Controller {

	@Autowired 
	private User2JPA user2Jpa;
	@RequestMapping(value = "/user2", method = RequestMethod.GET)
	public List<User2Entity> getAll(){
		return  user2Jpa.findAll();
	}
}
